package com.bluedot.bank.action;

import java.util.ArrayList;
import java.util.List;

import com.bluedot.bank.dao.role.Role;
import com.bluedot.bank.dao.role.RoleDao;
import com.bluedot.bank.dao.role.RoleDaoImpl;
import com.opensymphony.xwork2.ActionSupport;

public class HashRoleAction extends ActionSupport {
	
	private Role role =new Role();
	private List<Role> roles=new ArrayList<Role>();
	/**
	 * @return the role
	 */
	public Role getRole() {
		return role;
	}
	/**
	 * @param role the role to set
	 */
	public void setRole(Role role) {
		this.role = role;
	}
	/**
	 * @return the roles
	 */
	public List<Role> getRoles() {
		return roles;
	}
	/**
	 * @param roles the roles to set
	 */
	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}
	@Override
	public String execute() throws Exception {
		RoleDao roleDao=new RoleDaoImpl();
		roles=roleDao.getAll();
		return SUCCESS;
	}

}
